/**
 * mmiotable.h
 * Contains MMIO entries.
 *
 * @author  Philippe Johnson
 */

#ifndef __MMIOTABLE_H__
#define __MMIOTABLE_H__

/**
 * To differentiate from read and write handler entries
 */
typedef enum {
    READ,
    WRITE
} FUNCTIONTYPE;

typedef struct _MMIOEntry {
    u16          address;    /* SNES address associated with MMIO call   */
    FUNCTIONTYPE type;       /* Read or write handler?                   */
    mmioHandler  handler;    /* Funciton handler associated with address */
} MMIOEntry;

/* Table of MMIO entries. Terminated by an entry with address 0x0000 */
/* TODO: make this table accurate... edit as the available functions
 *       are implemented, I guess. D:
 */
MMIOEntry entryTable[] = { { 0x2100, READ , invalidMMIOCall },
                           { 0x2100, WRITE, invalidMMIOCall },
                           { 0x2101, READ , invalidMMIOCall },
                           { 0x2101, WRITE, invalidMMIOCall },
                           { 0x2102, READ , invalidMMIOCall },
                           { 0x2102, WRITE, invalidMMIOCall },
                           { 0x2104, READ , invalidMMIOCall },
                           { 0x2104, WRITE, invalidMMIOCall },
                           { 0x2105, READ , invalidMMIOCall },
                           { 0x2105, WRITE, invalidMMIOCall },
                           { 0x2106, READ , invalidMMIOCall },
                           { 0x2106, WRITE, invalidMMIOCall },
                           { 0x2107, READ , invalidMMIOCall },
                           { 0x2107, WRITE, invalidMMIOCall },
                           { 0x2108, READ , invalidMMIOCall },
                           { 0x2108, WRITE, invalidMMIOCall },
                           { 0x2109, READ , invalidMMIOCall },
                           { 0x2109, WRITE, invalidMMIOCall },
                           { 0x210A, READ , invalidMMIOCall },
                           { 0x210A, WRITE, invalidMMIOCall },
                           { 0x210B, READ , invalidMMIOCall },
                           { 0x210B, WRITE, invalidMMIOCall },
                           { 0x210C, READ , invalidMMIOCall },
                           { 0x210C, WRITE, invalidMMIOCall },
                           { 0x210D, READ , invalidMMIOCall },
                           { 0x210D, WRITE, invalidMMIOCall },
                           { 0x210E, READ , invalidMMIOCall },
                           { 0x210E, WRITE, invalidMMIOCall },
                           { 0x210F, READ , invalidMMIOCall },
                           { 0x210F, WRITE, invalidMMIOCall },
                           { 0x2110, READ , invalidMMIOCall },
                           { 0x2110, WRITE, invalidMMIOCall },
                           { 0x2111, READ , invalidMMIOCall },
                           { 0x2111, WRITE, invalidMMIOCall },
                           { 0x2112, READ , invalidMMIOCall },
                           { 0x2112, WRITE, invalidMMIOCall },
                           { 0x2113, READ , invalidMMIOCall },
                           { 0x2113, WRITE, invalidMMIOCall },
                           { 0x2114, READ , invalidMMIOCall },
                           { 0x2114, WRITE, invalidMMIOCall },
                           { 0x2115, READ , invalidMMIOCall },
                           { 0x2115, WRITE, invalidMMIOCall },
                           { 0x2116, READ , invalidMMIOCall },
                           { 0x2116, WRITE, invalidMMIOCall },
                           { 0x2117, READ , invalidMMIOCall },
                           { 0x2117, WRITE, invalidMMIOCall },
                           { 0x2118, READ , invalidMMIOCall },
                           { 0x2118, WRITE, invalidMMIOCall },
                           { 0x2119, READ , invalidMMIOCall },
                           { 0x2119, WRITE, invalidMMIOCall },
                           { 0x211A, READ , invalidMMIOCall },
                           { 0x211A, WRITE, invalidMMIOCall },
                           { 0x211B, READ , invalidMMIOCall },
                           { 0x211B, WRITE, invalidMMIOCall },
                           { 0x211C, READ , invalidMMIOCall },
                           { 0x211C, WRITE, invalidMMIOCall },
                           { 0x211D, READ , invalidMMIOCall },
                           { 0x211D, WRITE, invalidMMIOCall },
                           { 0x211E, READ , invalidMMIOCall },
                           { 0x211E, WRITE, invalidMMIOCall },
                           { 0x211F, READ , invalidMMIOCall },
                           { 0x211F, WRITE, invalidMMIOCall },
                           { 0x2120, READ,  invalidMMIOCall },
                           { 0x2120, WRITE, invalidMMIOCall },
                           { 0x2121, READ,  invalidMMIOCall },
                           { 0x2121, WRITE, invalidMMIOCall },
                           { 0x2122, READ , invalidMMIOCall },
                           { 0x2122, WRITE, invalidMMIOCall },
                           { 0x2123, READ , invalidMMIOCall },
                           { 0x2123, WRITE, invalidMMIOCall },
                           { 0x2124, READ , invalidMMIOCall },
                           { 0x2124, WRITE, invalidMMIOCall },
                           { 0x2125, READ , invalidMMIOCall },
                           { 0x2125, WRITE, invalidMMIOCall },
                           { 0x2126, READ , invalidMMIOCall },
                           { 0x2126, WRITE, invalidMMIOCall },
                           { 0x2127, READ , invalidMMIOCall },
                           { 0x2127, WRITE, invalidMMIOCall },
                           { 0x2128, READ , invalidMMIOCall },
                           { 0x2128, WRITE, invalidMMIOCall },
                           { 0x2129, READ , invalidMMIOCall },
                           { 0x212A, WRITE, invalidMMIOCall },
                           { 0x212A, READ , invalidMMIOCall },
                           { 0x212B, WRITE, invalidMMIOCall },
                           { 0x212B, READ , invalidMMIOCall },
                           { 0x212C, WRITE, invalidMMIOCall },
                           { 0x212C, READ , invalidMMIOCall },
                           { 0x212D, WRITE, invalidMMIOCall },
                           { 0x212D, READ , invalidMMIOCall },
                           { 0x212E, WRITE, invalidMMIOCall },
                           { 0x212E, READ , invalidMMIOCall },
                           { 0x212F, WRITE, invalidMMIOCall },
                           { 0x212F, READ , invalidMMIOCall },
                           { 0x2130, WRITE, invalidMMIOCall },
                           { 0x2130, READ , invalidMMIOCall },
                           { 0x2131, WRITE, invalidMMIOCall },
                           { 0x2131, READ , invalidMMIOCall },
                           { 0x2132, WRITE, invalidMMIOCall },
                           { 0x2132, READ , invalidMMIOCall },
                           { 0x2133, WRITE, invalidMMIOCall },
                           { 0x2133, READ , invalidMMIOCall },
                           { 0x2134, WRITE, invalidMMIOCall },
                           { 0x2134, READ , invalidMMIOCall },
                           { 0x2135, WRITE, invalidMMIOCall },
                           { 0x2135, READ , invalidMMIOCall },
                           { 0x2136, WRITE, invalidMMIOCall },
                           { 0x2136, READ , invalidMMIOCall },
                           { 0x2137, WRITE, invalidMMIOCall },
                           { 0x2137, READ , invalidMMIOCall },
                           { 0x2138, WRITE, invalidMMIOCall },
                           { 0x2138, READ , invalidMMIOCall },
                           { 0x2139, WRITE, invalidMMIOCall },
                           { 0x2139, READ , invalidMMIOCall },
                           { 0x213A, WRITE, invalidMMIOCall },
                           { 0x213A, READ , invalidMMIOCall },
                           { 0x213B, WRITE, invalidMMIOCall },
                           { 0x213B, READ , invalidMMIOCall },
                           { 0x213C, WRITE, invalidMMIOCall },
                           { 0x213C, READ , invalidMMIOCall },
                           { 0x213D, WRITE, invalidMMIOCall },
                           { 0x213D, READ , invalidMMIOCall },
                           { 0x213E, WRITE, invalidMMIOCall },
                           { 0x213E, READ , invalidMMIOCall },
                           { 0x213F, WRITE, invalidMMIOCall },
                           { 0x213F, READ , invalidMMIOCall },
                           { 0x2140, WRITE, invalidMMIOCall },
                           { 0x2140, READ , invalidMMIOCall },
                           { 0x2141, WRITE, invalidMMIOCall },
                           { 0x2141, READ , invalidMMIOCall },
                           { 0x2142, WRITE, invalidMMIOCall },
                           { 0x2142, READ , invalidMMIOCall },
                           { 0x2143, WRITE, invalidMMIOCall },
                           { 0x2143, READ , invalidMMIOCall },
                           { 0x4016, WRITE, invalidMMIOCall },
                           { 0x4016, READ , invalidMMIOCall },
                           { 0x4017, WRITE, invalidMMIOCall },
                           { 0x4017, READ , invalidMMIOCall },
                           { 0x4200, WRITE, invalidMMIOCall },
                           { 0x4200, READ , invalidMMIOCall },
                           { 0x4201, WRITE, invalidMMIOCall },
                           { 0x4201, READ , invalidMMIOCall },
                           { 0x4202, WRITE, invalidMMIOCall },
                           { 0x4202, READ , invalidMMIOCall },
                           { 0x4203, WRITE, invalidMMIOCall },
                           { 0x4204, READ , invalidMMIOCall },
                           { 0x4204, WRITE, invalidMMIOCall },
                           { 0x4205, READ , invalidMMIOCall },
                           { 0x4205, WRITE, invalidMMIOCall },
                           { 0x4206, READ , invalidMMIOCall },
                           { 0x4206, WRITE, invalidMMIOCall },
                           { 0x4207, READ , invalidMMIOCall },
                           { 0x4207, WRITE, invalidMMIOCall },
                           { 0x4208, READ , invalidMMIOCall },
                           { 0x4208, WRITE, invalidMMIOCall },
                           { 0x4209, READ , invalidMMIOCall },
                           { 0x4209, WRITE, invalidMMIOCall },
                           { 0x420A, READ , invalidMMIOCall },
                           { 0x420A, WRITE, invalidMMIOCall },
                           { 0x420B, READ , invalidMMIOCall },
                           { 0x420B, WRITE, invalidMMIOCall },
                           { 0x420C, READ , invalidMMIOCall },
                           { 0x420C, WRITE, invalidMMIOCall },
                           { 0x420D, READ , invalidMMIOCall },
                           { 0x420D, WRITE, invalidMMIOCall },
                           { 0x4210, READ , invalidMMIOCall },
                           { 0x4210, WRITE, invalidMMIOCall },
                           { 0x4211, READ , invalidMMIOCall },
                           { 0x4211, WRITE, invalidMMIOCall },
                           { 0x4212, READ , invalidMMIOCall },
                           { 0x4212, WRITE, invalidMMIOCall },
                           { 0x4213, READ , invalidMMIOCall },
                           { 0x4213, WRITE, invalidMMIOCall },
                           { 0x4214, READ , invalidMMIOCall },
                           { 0x4214, WRITE, invalidMMIOCall },
                           { 0x4215, READ , invalidMMIOCall },
                           { 0x4215, WRITE, invalidMMIOCall },
                           { 0x4216, READ , invalidMMIOCall },
                           { 0x4216, WRITE, invalidMMIOCall },
                           { 0x4217, READ , invalidMMIOCall },
                           { 0x4217, WRITE, invalidMMIOCall },
                           { 0x4218, READ , invalidMMIOCall },
                           { 0x4218, WRITE, invalidMMIOCall },
                           { 0x421A, READ , invalidMMIOCall },
                           { 0x421A, WRITE, invalidMMIOCall },
                           { 0x421C, READ , invalidMMIOCall },
                           { 0x421C, WRITE, invalidMMIOCall },
                           { 0x421E, READ , invalidMMIOCall },
                           { 0x421E, WRITE, invalidMMIOCall },
                           { 0x4219, READ , invalidMMIOCall },
                           { 0x4219, WRITE, invalidMMIOCall },
                           { 0x421B, READ , invalidMMIOCall },
                           { 0x421B, WRITE, invalidMMIOCall },
                           { 0x421D, READ , invalidMMIOCall },
                           { 0x421D, WRITE, invalidMMIOCall },
                           { 0x421F, READ , invalidMMIOCall },
                           { 0x421F, WRITE, invalidMMIOCall },
                           { 0x4300, READ , invalidMMIOCall },
                           { 0x4300, WRITE, invalidMMIOCall },
                           { 0x4310, READ , invalidMMIOCall },
                           { 0x4310, WRITE, invalidMMIOCall },
                           { 0x4320, READ , invalidMMIOCall },
                           { 0x4320, WRITE, invalidMMIOCall },
                           { 0x4330, READ , invalidMMIOCall },
                           { 0x4340, WRITE, invalidMMIOCall },
                           { 0x4340, READ , invalidMMIOCall },
                           { 0x4350, WRITE, invalidMMIOCall },
                           { 0x4350, READ , invalidMMIOCall },
                           { 0x4360, WRITE, invalidMMIOCall },
                           { 0x4360, READ , invalidMMIOCall },
                           { 0x4370, WRITE, invalidMMIOCall },
                           { 0x4370, READ , invalidMMIOCall },
                           { 0x4311, WRITE, invalidMMIOCall },
                           { 0x4311, READ , invalidMMIOCall },
                           { 0x4321, WRITE, invalidMMIOCall },
                           { 0x4321, READ , invalidMMIOCall },
                           { 0x4331, WRITE, invalidMMIOCall },
                           { 0x4331, READ , invalidMMIOCall },
                           { 0x4341, WRITE, invalidMMIOCall },
                           { 0x4341, READ , invalidMMIOCall },
                           { 0x4351, WRITE, invalidMMIOCall },
                           { 0x4351, READ , invalidMMIOCall },
                           { 0x4361, WRITE, invalidMMIOCall },
                           { 0x4361, READ , invalidMMIOCall },
                           { 0x4371, WRITE, invalidMMIOCall },
                           { 0x4371, READ , invalidMMIOCall },
                           { 0x4302, WRITE, invalidMMIOCall },
                           { 0x4302, READ , invalidMMIOCall },
                           { 0x4312, WRITE, invalidMMIOCall },
                           { 0x4312, READ , invalidMMIOCall },
                           { 0x4322, WRITE, invalidMMIOCall },
                           { 0x4322, READ , invalidMMIOCall },
                           { 0x4332, WRITE, invalidMMIOCall },
                           { 0x4332, READ , invalidMMIOCall },
                           { 0x4342, WRITE, invalidMMIOCall },
                           { 0x4342, READ , invalidMMIOCall },
                           { 0x4352, WRITE, invalidMMIOCall },
                           { 0x4352, READ , invalidMMIOCall },
                           { 0x4362, WRITE, invalidMMIOCall },
                           { 0x4362, READ , invalidMMIOCall },
                           { 0x4372, WRITE, invalidMMIOCall },
                           { 0x4372, READ , invalidMMIOCall },
                           { 0x4303, WRITE, invalidMMIOCall },
                           { 0x4303, READ , invalidMMIOCall },
                           { 0x4313, WRITE, invalidMMIOCall },
                           { 0x4313, READ , invalidMMIOCall },
                           { 0x4323, WRITE, invalidMMIOCall },
                           { 0x4323, READ , invalidMMIOCall },
                           { 0x4333, WRITE, invalidMMIOCall },
                           { 0x4333, READ , invalidMMIOCall },
                           { 0x4343, WRITE, invalidMMIOCall },
                           { 0x4343, READ , invalidMMIOCall },
                           { 0x4353, WRITE, invalidMMIOCall },
                           { 0x4353, READ , invalidMMIOCall },
                           { 0x4363, WRITE, invalidMMIOCall },
                           { 0x4363, READ , invalidMMIOCall },
                           { 0x4373, WRITE, invalidMMIOCall },
                           { 0x4373, READ , invalidMMIOCall },
                           { 0x4304, WRITE, invalidMMIOCall },
                           { 0x4304, READ , invalidMMIOCall },
                           { 0x4314, WRITE, invalidMMIOCall },
                           { 0x4314, READ , invalidMMIOCall },
                           { 0x4324, WRITE, invalidMMIOCall },
                           { 0x4324, READ , invalidMMIOCall },
                           { 0x4334, WRITE, invalidMMIOCall },
                           { 0x4334, READ , invalidMMIOCall },
                           { 0x4344, WRITE, invalidMMIOCall },
                           { 0x4344, READ , invalidMMIOCall },
                           { 0x4354, WRITE, invalidMMIOCall },
                           { 0x4354, READ , invalidMMIOCall },
                           { 0x4364, WRITE, invalidMMIOCall },
                           { 0x4364, READ , invalidMMIOCall },
                           { 0x4374, WRITE, invalidMMIOCall },
                           { 0x4374, READ , invalidMMIOCall },
                           { 0x4305, WRITE, invalidMMIOCall },
                           { 0x4305, READ , invalidMMIOCall },
                           { 0x4315, WRITE, invalidMMIOCall },
                           { 0x4315, READ , invalidMMIOCall },
                           { 0x4325, WRITE, invalidMMIOCall },
                           { 0x4325, READ , invalidMMIOCall },
                           { 0x4335, WRITE, invalidMMIOCall },
                           { 0x4335, READ , invalidMMIOCall },
                           { 0x4345, WRITE, invalidMMIOCall },
                           { 0x4345, READ , invalidMMIOCall },
                           { 0x4355, WRITE, invalidMMIOCall },
                           { 0x4355, READ , invalidMMIOCall },
                           { 0x4365, WRITE, invalidMMIOCall },
                           { 0x4365, READ , invalidMMIOCall },
                           { 0x4375, WRITE, invalidMMIOCall },
                           { 0x4375, READ , invalidMMIOCall },
                           { 0x4306, WRITE, invalidMMIOCall },
                           { 0x4306, READ , invalidMMIOCall },
                           { 0x4316, WRITE, invalidMMIOCall },
                           { 0x4316, READ , invalidMMIOCall },
                           { 0x4326, WRITE, invalidMMIOCall },
                           { 0x4326, READ , invalidMMIOCall },
                           { 0x4336, WRITE, invalidMMIOCall },
                           { 0x4336, READ , invalidMMIOCall },
                           { 0x4346, WRITE, invalidMMIOCall },
                           { 0x4346, READ , invalidMMIOCall },
                           { 0x4356, WRITE, invalidMMIOCall },
                           { 0x4356, READ , invalidMMIOCall },
                           { 0x4366, WRITE, invalidMMIOCall },
                           { 0x4366, READ , invalidMMIOCall },
                           { 0x4376, WRITE, invalidMMIOCall },
                           { 0x4376, READ , invalidMMIOCall },
                           { 0x4307, WRITE, invalidMMIOCall },
                           { 0x4307, READ , invalidMMIOCall },
                           { 0x4317, WRITE, invalidMMIOCall },
                           { 0x4317, READ , invalidMMIOCall },
                           { 0x4327, WRITE, invalidMMIOCall },
                           { 0x4327, READ , invalidMMIOCall },
                           { 0x4337, WRITE, invalidMMIOCall },
                           { 0x4337, READ , invalidMMIOCall },
                           { 0x4347, WRITE, invalidMMIOCall },
                           { 0x4347, READ , invalidMMIOCall },
                           { 0x4357, WRITE, invalidMMIOCall },
                           { 0x4357, READ , invalidMMIOCall },
                           { 0x4367, WRITE, invalidMMIOCall },
                           { 0x4367, READ , invalidMMIOCall },
                           { 0x4377, WRITE, invalidMMIOCall },
                           { 0x4377, READ , invalidMMIOCall },
                           { 0x4308, WRITE, invalidMMIOCall },
                           { 0x4308, READ , invalidMMIOCall },
                           { 0x4318, WRITE, invalidMMIOCall },
                           { 0x4318, READ , invalidMMIOCall },
                           { 0x4328, WRITE, invalidMMIOCall },
                           { 0x4328, READ , invalidMMIOCall },
                           { 0x4338, WRITE, invalidMMIOCall },
                           { 0x4338, READ , invalidMMIOCall },
                           { 0x4348, WRITE, invalidMMIOCall },
                           { 0x4348, READ , invalidMMIOCall },
                           { 0x4358, WRITE, invalidMMIOCall },
                           { 0x4358, READ , invalidMMIOCall },
                           { 0x4368, WRITE, invalidMMIOCall },
                           { 0x4368, READ , invalidMMIOCall },
                           { 0x4378, WRITE, invalidMMIOCall },
                           { 0x4378, READ , invalidMMIOCall },
                           { 0x4309, WRITE, invalidMMIOCall },
                           { 0x4309, READ , invalidMMIOCall },
                           { 0x4319, WRITE, invalidMMIOCall },
                           { 0x4309, READ , invalidMMIOCall },
                           { 0x4319, WRITE, invalidMMIOCall },
                           { 0x4329, READ , invalidMMIOCall },
                           { 0x4329, WRITE, invalidMMIOCall },
                           { 0x4339, READ , invalidMMIOCall },
                           { 0x4339, WRITE, invalidMMIOCall },
                           { 0x4349, READ , invalidMMIOCall },
                           { 0x4349, WRITE, invalidMMIOCall },
                           { 0x4359, READ , invalidMMIOCall },
                           { 0x4359, WRITE, invalidMMIOCall },
                           { 0x4360, READ , invalidMMIOCall },
                           { 0x4360, WRITE, invalidMMIOCall },
                           { 0x4379, READ , invalidMMIOCall },
                           { 0x4379, WRITE, invalidMMIOCall },
                           { 0x430A, READ , invalidMMIOCall },
                           { 0x430A, WRITE, invalidMMIOCall },
                           { 0x431A, READ , invalidMMIOCall },
                           { 0x431A, WRITE, invalidMMIOCall },
                           { 0x432A, READ , invalidMMIOCall },
                           { 0x432A, WRITE, invalidMMIOCall },
                           { 0x433A, READ , invalidMMIOCall },
                           { 0x433A, WRITE, invalidMMIOCall },
                           { 0x434A, READ , invalidMMIOCall },
                           { 0x434A, WRITE, invalidMMIOCall },
                           { 0x435A, READ , invalidMMIOCall },
                           { 0x435A, WRITE, invalidMMIOCall },
                           { 0x436A, READ , invalidMMIOCall },
                           { 0x436A, WRITE, invalidMMIOCall },
                           { 0x437A, READ , invalidMMIOCall }, 
                           { 0x437A, WRITE, invalidMMIOCall },
                           { 0x0000, READ , invalidMMIOCall } };

#endif /* __MMIOTABLE_H__ */

